<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let name = '李成'
        let age = '25'
        let Mydesc = '一坨大便'



        let obj ={
            name : name,
            age : age,
            desc : Mydesc
        }
        console.log(obj)


        // 简写

        let obj2 = {
            name,
            age,
            desc : Mydesc,
            sayHi : function(){
                alert('李成吃屎啦')
            }
        }

        console.log(obj2)
        obj2.sayHi()

    </script>
</body>
</html>